package org.jing.ext.media.m3u8;

import org.jing.core.lang.data.BaseDto;
import org.jing.ext.media.m3u8.tag.M3U8AllowCache;
import org.jing.ext.media.m3u8.tag.M3U8Key;
import org.jing.ext.media.m3u8.tag.M3U8MediaPartition;
import org.jing.ext.media.m3u8.tag.M3U8MediaSequence;
import org.jing.ext.media.m3u8.tag.M3U8PlaylistType;
import org.jing.ext.media.m3u8.tag.M3U8TargetDuration;
import org.jing.ext.media.m3u8.tag.M3U8Version;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * Description: <br>
 *
 * @author bksmate <br>
 * @since 2024-12-24 <br>
 */
public class M3U8 extends BaseDto {
    private M3U8Version version;

    private M3U8AllowCache allowCache;

    private M3U8TargetDuration targetDuration;

    private M3U8MediaSequence mediaSequence;

    private M3U8PlaylistType playlistType;

    private M3U8Key key;

    private final List<M3U8MediaPartition> mediaPartitions = new ArrayList<>();

    private File outputFile;

    private int completedCount = 0;

    public M3U8Version getVersion() {
        return version;
    }

    public void setVersion(M3U8Version version) {
        this.version = version;
    }

    public M3U8AllowCache getAllowCache() {
        return allowCache;
    }

    public void setAllowCache(M3U8AllowCache allowCache) {
        this.allowCache = allowCache;
    }

    public M3U8TargetDuration getTargetDuration() {
        return targetDuration;
    }

    public void setTargetDuration(M3U8TargetDuration targetDuration) {
        this.targetDuration = targetDuration;
    }

    public M3U8MediaSequence getMediaSequence() {
        return mediaSequence;
    }

    public void setMediaSequence(M3U8MediaSequence mediaSequence) {
        this.mediaSequence = mediaSequence;
    }

    public M3U8PlaylistType getPlaylistType() {
        return playlistType;
    }

    public void setPlaylistType(M3U8PlaylistType playlistType) {
        this.playlistType = playlistType;
    }

    public M3U8Key getKey() {
        return key;
    }

    public void setKey(M3U8Key key) {
        this.key = key;
    }

    public List<M3U8MediaPartition> getMediaPartitions() {
        return mediaPartitions;
    }

    public File getOutputFile() {
        return outputFile;
    }

    public void setOutputFile(File outputFile) {
        this.outputFile = outputFile;
    }

    public int getCompletedCount() {
        return completedCount;
    }

    public void addCompletedCount() {
        this.completedCount ++;
    }
}
